package com.kucai.yifaqapp.ui.activity;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.bigkoo.pickerview.OptionsPickerView;
import com.bigkoo.pickerview.TimePickerView;
import com.bumptech.glide.Glide;
import com.kucai.yifaqapp.R;
import com.kucai.yifaqapp.dagger.component.activity.DaggerLotteryopenActivityComponent;
import com.kucai.yifaqapp.dagger.module.activity.LotteryopenActivityModule;
import com.kucai.yifaqapp.model.network.entity.res.ResBanner;
import com.kucai.yifaqapp.model.network.entity.res.ResLottery;
import com.kucai.yifaqapp.presenter.activity.LotteryopenActivityPresenter;
import com.kucai.yifaqapp.ui.view.LotteryopenActivtyView;
import com.kucai.yifaqapp.util.DateSelector;
import com.kucai.yifaqapp.util.Liuhecaibose;
import com.kucai.yifaqapp.util.OnEndLessScrollListener;
import com.kucai.yifaqapp.util.OnItemClickListener;
import com.kucai.yifaqapp.util.SYSOUtils;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import butterknife.OnClick;

import static com.kucai.yifaqapp.global.App.getContext;

public class LotteryopenActivity extends BaseActivity<LotteryopenActivityPresenter> implements LotteryopenActivtyView {
    TextView titleLeftTv;
    TextView headerTitle;
    TextView gamelist;
    TextView timelist;
    RecyclerView lotteryList;
    SwipeRefreshLayout lotterySrf;
    LinearLayout skinbg;
    LinearLayout goback;

    private TimePickerView pvTime;
    private OptionsPickerView pvOptions;
    private static final List<String> options1Items = new ArrayList<>();//游戏弹框
    private static final List<String> options2Items = new ArrayList<>();//时间弹框
    private ArrayList<ResBanner.DataBeanX.GamesBean> gamedata = new ArrayList<>();//左侧游戏
    private ArrayList<ResLottery.DataBean> lotterydata = new ArrayList<>();//开奖结果
    private String gameid;
    private String datatime;
    private Adapter adapter;


    //赛车 跑马   快艇
    int[] img = {R.mipmap.one, R.mipmap.two, R.mipmap.three, R.mipmap.four, R.mipmap.fiv, R.mipmap.six, R.mipmap.seven,
            R.mipmap.eight, R.mipmap.noon, R.mipmap.ten};
    //时时彩
    int[] img1 = {R.mipmap.ones, R.mipmap.twos, R.mipmap.threes, R.mipmap.fours, R.mipmap.fivs, R.mipmap.sixs, R.mipmap.sevens,
            R.mipmap.eights, R.mipmap.noons, R.mipmap.tens};
    //niuniu
    int[] img2 = {R.mipmap.niu0, R.mipmap.niu1, R.mipmap.niu2, R.mipmap.niu3, R.mipmap.niu4, R.mipmap.niu5, R.mipmap.niu6,
            R.mipmap.niu7, R.mipmap.niu8, R.mipmap.niu9, R.mipmap.niu10,};
    //筛子
    int[] blankiv = {R.mipmap.sieve_r1, R.mipmap.sieve_b2, R.mipmap.sieve_b3, R.mipmap.sieve_r4, R.mipmap.sieve_b5, R.mipmap.sieve_b6};


    //六合彩
    int[] qiu = {R.mipmap.hongqiu, R.mipmap.lanqiu, R.mipmap.lvqiu};
    private OnEndLessScrollListener onEndLessScrollListener;
    private int page;//初始页数

    @Override

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        titleLeftTv = findViewById(R.id.title_left_tv);
        headerTitle = findViewById(R.id.headerTitle);
        gamelist = findViewById(R.id.gamelist);
        timelist = findViewById(R.id.timelist);
        lotteryList = findViewById(R.id.lottery_list);
        lotterySrf = findViewById(R.id.lottery_srf);
        skinbg = findViewById(R.id.skinbg);
        goback = findViewById(R.id.goback);
        Intent intent = getIntent();
        gameid = intent.getStringExtra("gameid");
        gamelist.setText(intent.getStringExtra("gamename"));
        headerTitle.setText("开奖结果");
        titleLeftTv.setText("返回");
        //获取游戏列表
        mPresenter.getbanner();
        //时间
        timepopset();
        //时间选择器
        pvTime = DateSelector.getPvDatePreDay(this, new TimePickerView.OnTimeSelectListener() {
            @Override
            public void onTimeSelect(Date date, View v) {
                timelist.setText(DateSelector.getDateString2(date));
                datatime = DateSelector.getDateString2(date);
                page = 1;
                lotterydata.clear();
//                SYSOUtils.sOut_("时间为shijianwei" + lotterydata.size());
                adapter.notifyDataSetChanged();
                //重置监听
                onEndLessScrollListener.reset();
                mPresenter.getlottery(datatime, gameid, 1);
            }
        });
        SYSOUtils.sOut_("时间为" + datatime + "游戏id" + gameid + page);
        //创建适配器
        adapter = new Adapter();
        lotteryList.setAdapter(adapter);
        //获取开奖结果
        mPresenter.getlottery(datatime, gameid, page);
        //页数赋值
        page = 1;
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
        lotteryList.setLayoutManager(linearLayoutManager);
        onEndLessScrollListener = new OnEndLessScrollListener(linearLayoutManager) {
            @Override
            public void getMoreData(int currentPage) {
                //下拉加载的时候页数加1
                SYSOUtils.sOut_("下拉时间为" + datatime + "游戏id" + gameid);
                mPresenter.getlottery(datatime, gameid, ++page);
            }
        };
        //滑动监听
        lotteryList.addOnScrollListener(onEndLessScrollListener);
        lotterySrf.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
                //刷新
                page = 1;
                //重置监听
                onEndLessScrollListener.reset();
                //和首次请求一样
                SYSOUtils.sOut_("刷新时间为" + datatime + "游戏id" + gameid);
                mPresenter.getlottery(datatime, gameid, page);
            }
        });

        goback.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    private void timepopset() {
        options2Items.clear();
        //获取当前时间
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
        Date curDate = new Date(System.currentTimeMillis());
        String str = formatter.format(curDate);
        datatime = str;
        timelist.setText(datatime + "");
    }

    @Override
    protected int setContentView() {
        return R.layout.activity_lotteryopen_activty;
    }

    @Override
    protected void ChangeSkin() {
        switch (SkinId) {
            case 17771:
                skinbg.setBackgroundResource(R.mipmap.skin_bg1);
                break;
            case 17772:
                skinbg.setBackgroundResource(R.mipmap.skin_bg2);
                break;
            case 17773:
                skinbg.setBackgroundResource(R.mipmap.skin_bg3);
                break;
            default:
                skinbg.setBackgroundResource(R.mipmap.skin_bg1);
        }
    }

    @Override
    protected void initDagger() {
        DaggerLotteryopenActivityComponent.builder()
                .lotteryopenActivityModule(new LotteryopenActivityModule(this))
                .build().inject(this);
    }

    @Override
    public void getgamelist(ResBanner resBanner) {
        if (resBanner.code == 0 && null != resBanner.data) {
            //左侧游戏
            if (resBanner.data.games != null) {
                gamedata.clear();
                gamedata.addAll(resBanner.data.games);
                for (int i = 0; i < gamedata.size(); i++) {
                    if (!gamedata.get(i).game_name.equals("棋牌游戏")) {
                        options1Items.add(gamedata.get(i).game_name);
                    }
//                    else {
//                        options1Items.clear();
//                    }
                }
            }
            pvOptions = new OptionsPickerView.Builder(LotteryopenActivity.this, new OptionsPickerView.OnOptionsSelectListener() {
                @Override
                public void onOptionsSelect(int options1, int option2, int options3, View v) {
                    //返回的分别是三个级别的选中位置
                    gamelist.setText(gamedata.get(options1 + 1).game_name);
                    gameid = String.valueOf(gamedata.get(options1 + 1).game_id);
                    page = 1;
                    lotterydata.clear();
                    adapter.notifyDataSetChanged();
                    SYSOUtils.sOut_("时间为shijianweizuoce" + lotterydata.size());
                    //重置监听
                    onEndLessScrollListener.reset();
                    mPresenter.getlottery(datatime, gameid, 1);
                }
            })
                    .setSubCalSize(20)//确定和取消文字大小
                    .setSubmitColor(Color.BLUE)//确定按钮文字颜色
                    .setCancelColor(Color.BLUE)//取消按钮文字颜色
                    .setTextColorCenter(Color.BLACK)//设置选中项的颜色
                    .build();
            pvOptions.setPicker(options1Items);
        }
    }

    @Override
    public void getlottery(ResLottery resBanner) {
        SYSOUtils.sOut_("开奖结果" + resBanner.data.size());
        lotterySrf.setRefreshing(false);
        //如果页数为1的时候清空数据，比如刷新的时候
        if (page == 1) {
            lotterydata.clear();
        }
        lotterydata.addAll(resBanner.data);
        adapter.notifyDataSetChanged();
    }

    @OnClick({R.id.title_left_tv, R.id.gamelist, R.id.timelist})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.title_left_tv:
                finish();
                break;
            case R.id.gamelist:
                pvOptions.show();

                break;
            case R.id.timelist:
                pvTime.show();
                break;
        }
    }

    class Adapter extends RecyclerView.Adapter<Adapter.MViewHolder>
            implements OnItemClickListener {
        @Override
        public MViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
            return new MViewHolder(LayoutInflater.from(getContext())
                    .inflate(R.layout.lottery_item, parent, false));

        }

        @Override
        public void onBindViewHolder(final MViewHolder holder, final int position) {
            holder.timte_tv.setText(lotterydata.get(position).openTime + "");
            holder.preiod_up_tv.setText(lotterydata.get(position).turnNum + "");
            String[] strarray = new String[0];
            if (!TextUtils.isEmpty(lotterydata.get(position).openNum)) {
                strarray = lotterydata.get(position).openNum.split(",");
            } else {
                holder.liuhecailin.setVisibility(View.GONE);
                holder.kuai8_lin.setVisibility(View.GONE);
                holder.kuaisan_lin.setVisibility(View.GONE);
                holder.pcdandan_lin.setVisibility(View.GONE);
                holder.putong_right.setVisibility(View.GONE);
                holder.niuniu_right.setVisibility(View.GONE);
            }

            switch (Integer.parseInt(gameid)) {
                case 80:
                    //秒速赛车
                case 50:
                    //北京赛车
                case 82:
                    //秒速快艇
                case 99:
                    //香港跑马
                case 801:
                    //快乐赛车
                case 802:
                case 804:
                case 55:
                case 901:

                    //快乐飞艇
                    holder.liuhecailin.setVisibility(View.GONE);
                    holder.kuai8_lin.setVisibility(View.GONE);
                    holder.kuaisan_lin.setVisibility(View.GONE);
                    holder.pcdandan_lin.setVisibility(View.GONE);
                    holder.ivtext_4.setVisibility(View.VISIBLE);
                    holder.ivtext_5.setVisibility(View.VISIBLE);
                    holder.ivtext_6.setVisibility(View.VISIBLE);
                    holder.ivtext_7.setVisibility(View.VISIBLE);
                    holder.ivtext_8.setVisibility(View.VISIBLE);
                    holder.putong_right.setVisibility(View.VISIBLE);
                    holder.niuniu_right.setVisibility(View.GONE);
                    holder.includ1_six.setVisibility(View.VISIBLE);
                    holder.includ1_seven.setVisibility(View.VISIBLE);
                    holder.includ1_eight.setVisibility(View.VISIBLE);
                    holder.includ1_noon.setVisibility(View.VISIBLE);
                    holder.includ1_ten.setVisibility(View.VISIBLE);
                    holder.ivtext_5.setVisibility(View.VISIBLE);
                    holder.ivtext_6.setVisibility(View.VISIBLE);
                    holder.ivtext_7.setVisibility(View.VISIBLE);
                    holder.ivtext_8.setVisibility(View.VISIBLE);
                    if (strarray.length != 0) {
                        Glide.with(LotteryopenActivity.this).load(img[Integer.parseInt(strarray[0]) - 1]).into(holder.includ1_one);
                        Glide.with(LotteryopenActivity.this).load(img[Integer.parseInt(strarray[1]) - 1]).into(holder.includ1_two);
                        Glide.with(LotteryopenActivity.this).load(img[Integer.parseInt(strarray[2]) - 1]).into(holder.includ1_three);
                        Glide.with(LotteryopenActivity.this).load(img[Integer.parseInt(strarray[3]) - 1]).into(holder.includ1_four);
                        Glide.with(LotteryopenActivity.this).load(img[Integer.parseInt(strarray[4]) - 1]).into(holder.includ1_five);
                        Glide.with(LotteryopenActivity.this).load(img[Integer.parseInt(strarray[5]) - 1]).into(holder.includ1_six);
                        Glide.with(LotteryopenActivity.this).load(img[Integer.parseInt(strarray[6]) - 1]).into(holder.includ1_seven);
                        Glide.with(LotteryopenActivity.this).load(img[Integer.parseInt(strarray[7]) - 1]).into(holder.includ1_eight);
                        Glide.with(LotteryopenActivity.this).load(img[Integer.parseInt(strarray[8]) - 1]).into(holder.includ1_noon);
                        Glide.with(LotteryopenActivity.this).load(img[Integer.parseInt(strarray[9]) - 1]).into(holder.includ1_ten);
                        holder.ivtext_1.setText(Integer.parseInt(strarray[0]) + Integer.parseInt(strarray[1]) + ""); // 1
                        int a = Integer.parseInt(strarray[0]) + Integer.parseInt(strarray[1]);
                        if (a > 11) {
                            holder.ivtext_2.setText("大");
                        } else {
                            holder.ivtext_2.setText("小");
                        }
                        if (a % 2 == 0) {
                            holder.ivtext_3.setText("双");
                        } else {
                            holder.ivtext_3.setText("单");
                        }
                        holder.ivtext_4.setText(Integer.parseInt(strarray[0]) > Integer.parseInt(strarray[9]) ? "龙" : "虎"); // 4
                        holder.ivtext_5.setText(Integer.parseInt(strarray[1]) > Integer.parseInt(strarray[8]) ? "龙" : "虎"); // 5
                        holder.ivtext_6.setText(Integer.parseInt(strarray[2]) > Integer.parseInt(strarray[7]) ? "龙" : "虎"); // 6
                        holder.ivtext_7.setText(Integer.parseInt(strarray[3]) > Integer.parseInt(strarray[6]) ? "龙" : "虎"); // 7
                        holder.ivtext_8.setText(Integer.parseInt(strarray[4]) > Integer.parseInt(strarray[5]) ? "龙" : "虎"); // 8
                    }

                    break;
                //分分彩
                case 112:
                case 113:
                    //快乐分分彩
                case 803:
                case 1:
                    //重庆时时彩
                case 4:
                    //新疆时时彩
                case 81:
                case 902:
                    //秒速时时彩
                    holder.liuhecailin.setVisibility(View.GONE);
                    holder.kuai8_lin.setVisibility(View.GONE);
                    holder.kuaisan_lin.setVisibility(View.GONE);
                    holder.pcdandan_lin.setVisibility(View.GONE);
                    holder.putong_right.setVisibility(View.VISIBLE);
                    holder.niuniu_right.setVisibility(View.GONE);
                    holder.includ1_six.setVisibility(View.GONE);
                    holder.includ1_seven.setVisibility(View.GONE);
                    holder.includ1_eight.setVisibility(View.GONE);
                    holder.includ1_noon.setVisibility(View.GONE);
                    holder.includ1_ten.setVisibility(View.GONE);
                    holder.ivtext_5.setVisibility(View.GONE);
                    holder.ivtext_6.setVisibility(View.GONE);
                    holder.ivtext_7.setVisibility(View.GONE);
                    holder.ivtext_8.setVisibility(View.GONE);
                    if (strarray.length != 0) {
                        if (Integer.parseInt(strarray[0]) != 0) {
                            Glide.with(LotteryopenActivity.this).load(img1[Integer.parseInt(strarray[0]) - 1]).into(holder.includ1_one);
                        } else {
                            Glide.with(LotteryopenActivity.this).load(img1[9]).into(holder.includ1_one);
                        }
                        if (Integer.parseInt(strarray[1]) != 0) {
                            Glide.with(LotteryopenActivity.this).load(img1[Integer.parseInt(strarray[1]) - 1]).into(holder.includ1_two);
                        } else {
                            Glide.with(LotteryopenActivity.this).load(img1[9]).into(holder.includ1_two);
                        }
                        if (Integer.parseInt(strarray[2]) != 0) {
                            Glide.with(LotteryopenActivity.this).load(img1[Integer.parseInt(strarray[2]) - 1]).into(holder.includ1_three);
                        } else {
                            Glide.with(LotteryopenActivity.this).load(img1[9]).into(holder.includ1_three);
                        }
                        if (Integer.parseInt(strarray[3]) != 0) {
                            Glide.with(LotteryopenActivity.this).load(img1[Integer.parseInt(strarray[3]) - 1]).into(holder.includ1_four);
                        } else {
                            Glide.with(LotteryopenActivity.this).load(img1[9]).into(holder.includ1_four);
                        }
                        if (Integer.parseInt(strarray[4]) != 0) {
                            Glide.with(LotteryopenActivity.this).load(img1[Integer.parseInt(strarray[4]) - 1]).into(holder.includ1_five);
                        } else {
                            Glide.with(LotteryopenActivity.this).load(img1[9]).into(holder.includ1_five);
                        }

                        holder.ivtext_1.setText(Integer.parseInt(strarray[0]) + Integer.parseInt(strarray[1]) +
                                Integer.parseInt(strarray[2]) + Integer.parseInt(strarray[3]) + Integer.parseInt(strarray[4]) + ""); // 1
                        int a2 = Integer.parseInt(strarray[0]) + Integer.parseInt(strarray[1]) +
                                Integer.parseInt(strarray[2]) + Integer.parseInt(strarray[3]) + Integer.parseInt(strarray[4]);
                        if (a2 >= 23) {
                            holder.ivtext_2.setText("大");
                        } else {
                            holder.ivtext_2.setText("小");
                        }
                        if (a2 % 2 == 0) {
                            holder.ivtext_3.setText("双");
                        } else {
                            holder.ivtext_3.setText("单");

                        }
                        if (Integer.parseInt(strarray[0]) > Integer.parseInt(strarray[4])) {
                            holder.ivtext_4.setText("龙");
                        } else if (Integer.parseInt(strarray[0]) < Integer.parseInt(strarray[4])) {
                            holder.ivtext_4.setText("虎");
                        } else {
                            holder.ivtext_4.setText("和");
                        }
                    }

                    break;
                case 91:
                    //秒速牛牛
                case 90:
                    //pk10牛牛
                    holder.liuhecailin.setVisibility(View.GONE);
                    holder.kuai8_lin.setVisibility(View.GONE);
                    holder.kuaisan_lin.setVisibility(View.GONE);
                    holder.niuniu_right.setVisibility(View.VISIBLE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.pcdandan_lin.setVisibility(View.GONE);
                    if (strarray.length != 0) {
                        holder.kuai8_onet.setText(strarray[0]);
                        holder.kuai8_twot.setText(strarray[1]);
                        holder.kuai8_threet.setText(strarray[2]);
                        holder.kuai8_fourt.setText(strarray[3]);
                        holder.kuai8_fivt.setText(strarray[4]);
                        holder.kuai8_sixt.setText(strarray[5]);
                        holder.kuai8_sevent.setText(strarray[6]);
                        holder.kuai8_eightt.setText(strarray[7]);
                        holder.kuai8_noont.setText(strarray[8]);
                        holder.kuai8_tent.setText(strarray[9]);
                        if (!"-1".equals(lotterydata.get(position).n11)) {
                            Glide.with(LotteryopenActivity.this).load(img2[Integer.parseInt(lotterydata.get(position).n11)]).into(holder.niu1);
                        } else {
                            Glide.with(LotteryopenActivity.this).load(img2[0]).into(holder.niu1);
                        }
                        if (!"-1".equals(lotterydata.get(position).n12)) {
                            Glide.with(LotteryopenActivity.this).load(img2[Integer.parseInt(lotterydata.get(position).n12)]).into(holder.niu2);
                        } else {
                            Glide.with(LotteryopenActivity.this).load(img2[0]).into(holder.niu2);
                        }
                        if (!"-1".equals(lotterydata.get(position).n13)) {
                            Glide.with(LotteryopenActivity.this).load(img2[Integer.parseInt(lotterydata.get(position).n13)]).into(holder.niu3);
                        } else {
                            Glide.with(LotteryopenActivity.this).load(img2[0]).into(holder.niu3);
                        }
                        if (!"-1".equals(lotterydata.get(position).n14)) {
                            Glide.with(LotteryopenActivity.this).load(img2[Integer.parseInt(lotterydata.get(position).n14)]).into(holder.niu4);
                        } else {
                            Glide.with(LotteryopenActivity.this).load(img2[0]).into(holder.niu4);
                        }
                        if (!"-1".equals(lotterydata.get(position).n15)) {
                            Glide.with(LotteryopenActivity.this).load(img2[Integer.parseInt(lotterydata.get(position).n15)]).into(holder.niu5);
                        } else {
                            Glide.with(LotteryopenActivity.this).load(img2[0]).into(holder.niu5);
                        }
                        if (!"-1".equals(lotterydata.get(position).n16)) {
                            Glide.with(LotteryopenActivity.this).load(img2[Integer.parseInt(lotterydata.get(position).n16)]).into(holder.niu6);
                        } else {
                            Glide.with(LotteryopenActivity.this).load(img2[0]).into(holder.niu6);
                        }
                        if (lotterydata.get(position).winPlayer1.equals("1")) {
                            holder.xian1.setBackgroundColor(getContext().getResources().getColor(R.color.yellow));
                        }
                        if (lotterydata.get(position).winPlayer2.equals("1")) {
                            holder.xian2.setBackgroundColor(getContext().getResources().getColor(R.color.yellow));
                        }
                        if (lotterydata.get(position).winPlayer3.equals("1")) {
                            holder.xian3.setBackgroundColor(getContext().getResources().getColor(R.color.yellow));
                        }
                        if (lotterydata.get(position).winPlayer4.equals("1")) {
                            holder.xian4.setBackgroundColor(getContext().getResources().getColor(R.color.yellow));
                        }
                        if (lotterydata.get(position).winPlayer5.equals("1")) {
                            holder.xian5.setBackgroundColor(getContext().getResources().getColor(R.color.yellow));
                        }
                        if (lotterydata.get(position).winPlayer5.equals("0") && lotterydata.get(position).winPlayer4.equals("0")
                                && lotterydata.get(position).winPlayer3.equals("0") && lotterydata.get(position).winPlayer2.equals("0")
                                && lotterydata.get(position).winPlayer1.equals("0")) {
                            holder.zhuanglin.setBackgroundColor(getContext().getResources().getColor(R.color.yellow));
                        }


                    }

                    break;
                case 66:
                    //pc蛋蛋
                    holder.liuhecailin.setVisibility(View.GONE);
                    holder.kuai8_lin.setVisibility(View.GONE);
                    holder.kuaisan_lin.setVisibility(View.GONE);
                    holder.pcdandan_lin.setVisibility(View.VISIBLE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.niuniu_right.setVisibility(View.GONE);
                    holder.ivtext_4.setVisibility(View.GONE);
                    holder.ivtext_5.setVisibility(View.GONE);
                    holder.ivtext_6.setVisibility(View.GONE);
                    holder.ivtext_7.setVisibility(View.GONE);
                    holder.ivtext_8.setVisibility(View.GONE);
                    if (strarray.length != 0) {
                        holder.pcdandan_one.setText(strarray[0]);
                        holder.pcdandan_two.setText(strarray[1]);
                        holder.pcdandan_three.setText(strarray[2]);

                        int a1 = Integer.parseInt(strarray[0]) + Integer.parseInt(strarray[1]) + Integer.parseInt(strarray[2]);
                        holder.pcdandan_fiv.setText(a1 + "");
                        holder.pcivtext_1.setText(a1 + "");
                        if (a1 > 13) {
                            holder.pcivtext_2.setText("大");
                        } else {
                            holder.pcivtext_2.setText("小");
                        }
                        if (a1 % 2 == 0) {
                            holder.pcivtext_3.setText("双");
                        } else {
                            holder.pcivtext_3.setText("单");

                        }
                    }


                    break;
                case 65:
                    //快乐北京8
                    holder.liuhecailin.setVisibility(View.GONE);
                    holder.kuai8_six.setVisibility(View.VISIBLE);
                    holder.kuai8_seven.setVisibility(View.VISIBLE);
                    holder.kuai8_eight.setVisibility(View.VISIBLE);
                    holder.kuai8shifenlin.setVisibility(View.GONE);
                    holder.kuai8tv.setVisibility(View.VISIBLE);
                    holder.kuai8_lin.setVisibility(View.VISIBLE);
                    holder.kuaisan_lin.setVisibility(View.GONE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.niuniu_right.setVisibility(View.GONE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.pcdandan_lin.setVisibility(View.GONE);
                    holder.kuai8_noon.setVisibility(View.VISIBLE);
                    holder.kuai8_ten.setVisibility(View.VISIBLE);
                    if (strarray.length != 0) {
                        holder.kuai8_one.setText(strarray[0]);
                        holder.kuai8_two.setText(strarray[1]);
                        holder.kuai8_three.setText(strarray[2]);
                        holder.kuai8_four.setText(strarray[3]);
                        holder.kuai8_fiv.setText(strarray[4]);
                        holder.kuai8_six.setText(strarray[5]);
                        holder.kuai8_seven.setText(strarray[6]);
                        holder.kuai8_eight.setText(strarray[7]);
                        holder.kuai8_noon.setText(strarray[8]);
                        holder.kuai8_ten.setText(strarray[9]);
                        holder.kuai8_1.setText(strarray[10]);
                        holder.kuai8_2.setText(strarray[11]);
                        holder.kuai8_3.setText(strarray[12]);
                        holder.kuai8_4.setText(strarray[13]);
                        holder.kuai8_5.setText(strarray[14]);
                        holder.kuai8_6.setText(strarray[15]);
                        holder.kuai8_7.setText(strarray[16]);
                        holder.kuai8_8.setText(strarray[17]);
                        holder.kuai8_9.setText(strarray[18]);
                        holder.kuai8_10.setText(strarray[19]);
                    }

                    break;
                case 86:
                    //秒速快三
                case 10:
                    //江苏快三
                case 12:
                    //广西快三
                case 13:
                    //湖北快三
                case 16:
                    //甘肃快三
                case 15:
                    //河北快三
                case 18:
                    //贵州快三
                case 11:
                    //安徽快三
                    holder.liuhecailin.setVisibility(View.GONE);
                    holder.kuai8_lin.setVisibility(View.GONE);
                    holder.kuaisan_lin.setVisibility(View.VISIBLE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.niuniu_right.setVisibility(View.GONE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.pcdandan_lin.setVisibility(View.GONE);
                    if (strarray.length != 0) {
                        holder.kuaisan_lin.setVisibility(View.VISIBLE);
                        Glide.with(LotteryopenActivity.this).load(blankiv[Integer.parseInt(strarray[0]) - 1]).into(holder.ivkuaisan1);
                        Glide.with(LotteryopenActivity.this).load(blankiv[Integer.parseInt(strarray[1]) - 1]).into(holder.ivkuaisan2);
                        Glide.with(LotteryopenActivity.this).load(blankiv[Integer.parseInt(strarray[2]) - 1]).into(holder.ivkuaisan3);
                        int b = Integer.parseInt(strarray[0]) + Integer.parseInt(strarray[1]) + Integer.parseInt(strarray[2]);
                        holder.kuaisan_1.setText(String.valueOf(b));
                        if (Integer.parseInt(strarray[0]) == Integer.parseInt(strarray[1]) && Integer.parseInt(strarray[0]) == Integer.parseInt(strarray[2])) {
                            holder.kuaisan_2.setText(" 豹子 ");
                        } else {
                            holder.kuaisan_2.setText(b >= 11 ? " 大 " : " 小 ");
                        }
                        holder.kuaisan_3.setText(b % 2 == 0 ? "双" : "单");
                    } else {
                        holder.kuaisan_lin.setVisibility(View.INVISIBLE);
                    }

                    break;
                case 60:
                    //快乐十分
                    holder.liuhecailin.setVisibility(View.GONE);
                    holder.kuai8_six.setVisibility(View.VISIBLE);
                    holder.kuai8_seven.setVisibility(View.VISIBLE);
                    holder.kuai8_eight.setVisibility(View.VISIBLE);
                    holder.kuai8shifenlin.setVisibility(View.VISIBLE);
                    holder.kuai8tv.setVisibility(View.GONE);
                    holder.kuai8_lin.setVisibility(View.VISIBLE);
                    holder.kuaisan_lin.setVisibility(View.GONE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.niuniu_right.setVisibility(View.GONE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.pcdandan_lin.setVisibility(View.GONE);

                    if (strarray.length != 0) {
                        holder.kuai8_one.setText(strarray[0] + "");
                        SYSOUtils.sOut_("++++++++++++++++++++++++++++++++++++++++++++++" + holder.kuai8_one.getText().toString());
                        holder.kuai8_two.setText(strarray[1]);
                        holder.kuai8_three.setText(strarray[2]);
                        holder.kuai8_four.setText(strarray[3]);
                        holder.kuai8_fiv.setText(strarray[4]);
                        holder.kuai8_six.setText(strarray[5]);
                        holder.kuai8_seven.setText(strarray[6]);
                        holder.kuai8_eight.setText(strarray[7]);
                        holder.kuai8_noon.setVisibility(View.GONE);
                        holder.kuai8_ten.setVisibility(View.GONE);
                        int a1 = Integer.parseInt(strarray[0]) + Integer.parseInt(strarray[1]) + Integer.parseInt(strarray[2]) + Integer.parseInt(strarray[3]) +
                                Integer.parseInt(strarray[4]) + Integer.parseInt(strarray[5]) + Integer.parseInt(strarray[6]) + Integer.parseInt(strarray[7]);

                        holder.shifentv1.setText(a1 + "");
                        if (a1 > 84) {
                            holder.shifentv2.setText("大");
                        } else if (a1 == 84) {
                            holder.shifentv2.setText("和");
                        } else {
                            holder.shifentv2.setText("小");
                        }
                        holder.shifentv3.setText(a1 % 2 == 0 ? "双" : "单");
                        holder.shifentv4.setText(a1 % 10 > 4 ? "大" : "小");
                        holder.shifentv5.setVisibility(View.GONE);
                    }


                    break;
                case 61:
                    //幸运农场
                    holder.liuhecailin.setVisibility(View.GONE);
                    holder.kuai8_six.setVisibility(View.VISIBLE);
                    holder.kuai8_seven.setVisibility(View.VISIBLE);
                    holder.kuai8_eight.setVisibility(View.VISIBLE);
                    holder.kuai8shifenlin.setVisibility(View.VISIBLE);
                    holder.kuai8tv.setVisibility(View.GONE);
                    holder.kuai8_lin.setVisibility(View.VISIBLE);
                    holder.kuaisan_lin.setVisibility(View.GONE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.niuniu_right.setVisibility(View.GONE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.pcdandan_lin.setVisibility(View.GONE);
                    if (strarray.length != 0) {
                        holder.kuai8_one.setText(strarray[0]);
                        holder.kuai8_two.setText(strarray[1]);
                        holder.kuai8_three.setText(strarray[2]);
                        holder.kuai8_four.setText(strarray[3]);
                        holder.kuai8_fiv.setText(strarray[4]);
                        holder.kuai8_six.setText(strarray[5]);
                        holder.kuai8_seven.setText(strarray[6]);
                        holder.kuai8_eight.setText(strarray[7]);

                        int a = Integer.parseInt(strarray[0]) + Integer.parseInt(strarray[1]) + Integer.parseInt(strarray[2]) + Integer.parseInt(strarray[3]) +
                                Integer.parseInt(strarray[4]) + Integer.parseInt(strarray[5]) + Integer.parseInt(strarray[6]) + Integer.parseInt(strarray[7]);

                        holder.shifentv1.setText(a + "");
                        if (a > 84) {
                            holder.shifentv2.setText("大");
                        } else if (a == 84) {
                            holder.shifentv2.setText("和");
                        } else {
                            holder.shifentv2.setText("小");
                        }
                        holder.shifentv3.setText(a % 2 == 0 ? "双" : "单");
                        holder.shifentv4.setText(a % 10 > 5 ? "大" : "小");
                        holder.shifentv5.setVisibility(View.GONE);
                    }

                    holder.kuai8_noon.setVisibility(View.GONE);
                    holder.kuai8_ten.setVisibility(View.GONE);

                    break;
                case 21:
                    //十一选五
                    holder.liuhecailin.setVisibility(View.GONE);
                    holder.kuai8shifenlin.setVisibility(View.VISIBLE);
                    holder.kuai8tv.setVisibility(View.GONE);
                    holder.kuai8_lin.setVisibility(View.VISIBLE);
                    holder.kuaisan_lin.setVisibility(View.GONE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.niuniu_right.setVisibility(View.GONE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.pcdandan_lin.setVisibility(View.GONE);
                    if (strarray.length != 0) {
                        holder.kuai8_one.setText(strarray[0]);
                        holder.kuai8_two.setText(strarray[1]);
                        holder.kuai8_three.setText(strarray[2]);
                        holder.kuai8_four.setText(strarray[3]);
                        holder.kuai8_fiv.setText(strarray[4]);

                        int a = Integer.parseInt(strarray[0]) + Integer.parseInt(strarray[1]) +
                                Integer.parseInt(strarray[2]) + Integer.parseInt(strarray[3]) + Integer.parseInt(strarray[4]);

                        holder.shifentv1.setText(a + "");
                        if (a > 30) {
                            holder.shifentv2.setText("大");
                        } else if (a == 30) {
                            holder.shifentv2.setText("和");
                        } else {
                            holder.shifentv2.setText("小");
                        }
                        holder.shifentv3.setText(a % 2 == 0 ? "双" : "单");
                        holder.shifentv4.setText(a % 10 >= 5 ? "大" : "小");
                        holder.shifentv5.setText(Integer.parseInt(strarray[0]) > Integer.parseInt(strarray[4]) ? "龙" : "虎");
                    }
                    holder.kuai8_six.setVisibility(View.GONE);
                    holder.kuai8_seven.setVisibility(View.GONE);
                    holder.kuai8_eight.setVisibility(View.GONE);
                    holder.kuai8_noon.setVisibility(View.GONE);
                    holder.kuai8_ten.setVisibility(View.GONE);

                    break;
                case 70:
                    //香港六合彩

                case 85:
                case 903:
                case 904:
                    //幸运六合彩
                    holder.liuhecailin.setVisibility(View.VISIBLE);
                    holder.kuai8_lin.setVisibility(View.GONE);
                    holder.kuaisan_lin.setVisibility(View.GONE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.niuniu_right.setVisibility(View.GONE);
                    holder.putong_right.setVisibility(View.GONE);
                    holder.pcdandan_lin.setVisibility(View.GONE);
                    if (strarray.length != 0) {
                        holder.includ1_one1.setBackgroundResource(qiu[Liuhecaibose.toimg(strarray[0])]);
                        holder.includ1_one2.setBackgroundResource(qiu[Liuhecaibose.toimg(strarray[1])]);
                        holder.includ1_one3.setBackgroundResource(qiu[Liuhecaibose.toimg(strarray[2])]);
                        holder.includ1_one4.setBackgroundResource(qiu[Liuhecaibose.toimg(strarray[3])]);
                        holder.includ1_one5.setBackgroundResource(qiu[Liuhecaibose.toimg(strarray[4])]);
                        holder.includ1_one6.setBackgroundResource(qiu[Liuhecaibose.toimg(strarray[5])]);
                        holder.includ1_one8.setBackgroundResource(qiu[Liuhecaibose.toimg(strarray[6])]);
                        if (Integer.parseInt(strarray[0]) < 10 && Integer.parseInt(strarray[0]) != 0) {
                            holder.includ1_one1.setText("0" + strarray[0]);
                        } else {
                            holder.includ1_one1.setText(strarray[0]);
                        }
                        if (Integer.parseInt(strarray[1]) < 10 && Integer.parseInt(strarray[1]) != 0) {
                            holder.includ1_one2.setText("0" + strarray[1]);
                        } else {
                            holder.includ1_one2.setText(strarray[1]);
                        }
                        if (Integer.parseInt(strarray[2]) < 10 && Integer.parseInt(strarray[2]) != 0) {
                            holder.includ1_one3.setText("0" + strarray[2]);
                        } else {
                            holder.includ1_one3.setText(strarray[2]);
                        }
                        if (Integer.parseInt(strarray[3]) < 10 && Integer.parseInt(strarray[3]) != 0) {
                            holder.includ1_one4.setText("0" + strarray[3]);
                        } else {
                            holder.includ1_one4.setText(strarray[3]);
                        }
                        if (Integer.parseInt(strarray[4]) < 10 && Integer.parseInt(strarray[4]) != 0) {
                            holder.includ1_one5.setText("0" + strarray[4]);
                        } else {
                            holder.includ1_one5.setText(strarray[4]);
                        }
                        if (Integer.parseInt(strarray[5]) < 10 && Integer.parseInt(strarray[5]) != 0) {
                            holder.includ1_one6.setText("0" + strarray[5]);
                        } else {
                            holder.includ1_one6.setText(strarray[5]);
                        }
                        if (Integer.parseInt(strarray[6]) < 10 && Integer.parseInt(strarray[6]) != 0) {
                            holder.includ1_one8.setText("0" + strarray[6]);
                        } else {
                            holder.includ1_one8.setText(strarray[6]);
                        }
                        holder.includ1_one7.setVisibility(View.GONE);
                        holder.liuhecaitv1.setText(lotterydata.get(position).n1_sx);
                        holder.liuhecaitv2.setText(lotterydata.get(position).n2_sx);
                        holder.liuhecaitv3.setText(lotterydata.get(position).n3_sx);
                        holder.liuhecaitv4.setText(lotterydata.get(position).n4_sx);
                        holder.liuhecaitv5.setText(lotterydata.get(position).n5_sx);
                        holder.liuhecaitv6.setText(lotterydata.get(position).n6_sx);
                        holder.liuhecaitv7.setVisibility(View.GONE);
                        holder.liuhecaitv8.setText(lotterydata.get(position).n7_sx);
                    }


                    break;

                default:
                    Toast.makeText(getContext(), "传入游戏id暂未设置", Toast.LENGTH_SHORT).show();
                    break;
            }
        }

        @Override
        public int getItemCount() {
            return lotterydata.size();
        }

        @Override
        public void onItemClick(View view, int position) {

        }

        class MViewHolder extends RecyclerView.ViewHolder {
            ImageView includ1_one, includ1_two, includ1_three, includ1_four, includ1_five, includ1_six, includ1_seven, includ1_eight, includ1_noon, includ1_ten;


            ImageView niu1, niu2, niu3, niu4, niu5, niu6, ivkuaisan1, ivkuaisan2, ivkuaisan3;

            TextView ivtext_1, ivtext_2, ivtext_3, ivtext_4, ivtext_5, ivtext_6, ivtext_7, ivtext_8, timte_tv, preiod_up_tv, kuaisan_1, kuaisan_2, kuaisan_3;

            TextView pcdandan_one, pcdandan_two, pcdandan_three, pcdandan_four, pcdandan_fiv, pcivtext_1, pcivtext_2, pcivtext_3;

            LinearLayout pcdandan_lin, niuniu_right, putong_right, zhuanglin, xian1, xian2, xian3, xian4, xian5, liuhecailin, kuaisan_lin, kuai8_lin, kuai8tv, kuai8shifenlin;

            TextView kuai8_onet, kuai8_twot, kuai8_threet, kuai8_fourt, kuai8_fivt, kuai8_sixt, kuai8_sevent, kuai8_eightt, kuai8_noont, kuai8_tent;

            TextView kuai8_1, kuai8_2, kuai8_3, kuai8_4, kuai8_5, kuai8_6, kuai8_7, kuai8_8, kuai8_9, kuai8_10;

            TextView kuai8_one, kuai8_two, kuai8_three, kuai8_four, kuai8_fiv, kuai8_six, kuai8_seven, kuai8_eight, kuai8_noon, kuai8_ten;

            TextView shifentv1, shifentv2, shifentv3, shifentv4, shifentv5, includ1_one1, includ1_one2, includ1_one3, includ1_one4, includ1_one5, includ1_one6, includ1_one7, includ1_one8;

            TextView liuhecaitv1, liuhecaitv2, liuhecaitv3, liuhecaitv4, liuhecaitv5, liuhecaitv6, liuhecaitv7, liuhecaitv8;

            MViewHolder(View itemView) {
                super(itemView);
                kuai8_onet = (TextView) itemView.findViewById(R.id.kuai8_onet);
                kuai8_twot = (TextView) itemView.findViewById(R.id.kuai8_twot);
                kuai8_threet = (TextView) itemView.findViewById(R.id.kuai8_threet);
                kuai8_fourt = (TextView) itemView.findViewById(R.id.kuai8_fourt);
                kuai8_fivt = (TextView) itemView.findViewById(R.id.kuai8_fivt);
                kuai8_sixt = (TextView) itemView.findViewById(R.id.kuai8_sixt);
                kuai8_sevent = (TextView) itemView.findViewById(R.id.kuai8_sevent);
                kuai8_eightt = (TextView) itemView.findViewById(R.id.kuai8_eightt);
                kuai8_noont = (TextView) itemView.findViewById(R.id.kuai8_noont);
                kuai8_tent = (TextView) itemView.findViewById(R.id.kuai8_tent);

                timte_tv = (TextView) itemView.findViewById(R.id.timte_tv);
                preiod_up_tv = (TextView) itemView.findViewById(R.id.preiod_up_tv);
                niuniu_right = (LinearLayout) itemView.findViewById(R.id.niuniu_right);
                putong_right = (LinearLayout) itemView.findViewById(R.id.putong_right);
                pcdandan_lin = (LinearLayout) itemView.findViewById(R.id.pcdandan_lin);
                kuaisan_lin = (LinearLayout) itemView.findViewById(R.id.kuaisan_lin);
                kuai8_lin = (LinearLayout) itemView.findViewById(R.id.kuai8_lin);
                liuhecailin = (LinearLayout) itemView.findViewById(R.id.liuhecailin);

                zhuanglin = (LinearLayout) itemView.findViewById(R.id.zhuanglin);
                xian1 = (LinearLayout) itemView.findViewById(R.id.xian1);
                xian2 = (LinearLayout) itemView.findViewById(R.id.xian2);
                xian3 = (LinearLayout) itemView.findViewById(R.id.xian3);
                xian4 = (LinearLayout) itemView.findViewById(R.id.xian4);
                xian5 = (LinearLayout) itemView.findViewById(R.id.xian5);
                kuai8tv = (LinearLayout) itemView.findViewById(R.id.kuai8tv);//快乐十分时隐藏
                kuai8shifenlin = (LinearLayout) itemView.findViewById(R.id.kuai8shifenlin);//快乐十分时隐藏

                ivkuaisan1 = (ImageView) itemView.findViewById(R.id.ivkuaisan1);
                ivkuaisan2 = (ImageView) itemView.findViewById(R.id.ivkuaisan2);
                ivkuaisan3 = (ImageView) itemView.findViewById(R.id.ivkuaisan3);
                includ1_one = (ImageView) itemView.findViewById(R.id.includ1_one);
                includ1_two = (ImageView) itemView.findViewById(R.id.includ1_two);
                includ1_three = (ImageView) itemView.findViewById(R.id.includ1_three);
                includ1_four = (ImageView) itemView.findViewById(R.id.includ1_four);
                includ1_five = (ImageView) itemView.findViewById(R.id.includ1_five);
                includ1_six = (ImageView) itemView.findViewById(R.id.includ1_six);
                includ1_seven = (ImageView) itemView.findViewById(R.id.includ1_seven);
                includ1_eight = (ImageView) itemView.findViewById(R.id.includ1_eight);
                includ1_noon = (ImageView) itemView.findViewById(R.id.includ1_noon);
                includ1_ten = (ImageView) itemView.findViewById(R.id.includ1_ten);
                niu1 = (ImageView) itemView.findViewById(R.id.niu1);
                niu2 = (ImageView) itemView.findViewById(R.id.niu2);
                niu3 = (ImageView) itemView.findViewById(R.id.niu3);
                niu4 = (ImageView) itemView.findViewById(R.id.niu4);
                niu5 = (ImageView) itemView.findViewById(R.id.niu5);
                niu6 = (ImageView) itemView.findViewById(R.id.niu6);
                ivtext_1 = (TextView) itemView.findViewById(R.id.ivtext_1);
                ivtext_2 = (TextView) itemView.findViewById(R.id.ivtext_2);
                ivtext_3 = (TextView) itemView.findViewById(R.id.ivtext_3);
                pcivtext_1 = (TextView) itemView.findViewById(R.id.pcivtext_1);
                pcivtext_2 = (TextView) itemView.findViewById(R.id.pcivtext_2);
                pcivtext_3 = (TextView) itemView.findViewById(R.id.pcivtext_3);
                ivtext_4 = (TextView) itemView.findViewById(R.id.ivtext_4);
                ivtext_5 = (TextView) itemView.findViewById(R.id.ivtext_5);
                ivtext_6 = (TextView) itemView.findViewById(R.id.ivtext_6);
                ivtext_7 = (TextView) itemView.findViewById(R.id.ivtext_7);
                ivtext_8 = (TextView) itemView.findViewById(R.id.ivtext_8);
                pcdandan_one = (TextView) itemView.findViewById(R.id.pcdandan_one);
                pcdandan_two = (TextView) itemView.findViewById(R.id.pcdandan_two);
                pcdandan_three = (TextView) itemView.findViewById(R.id.pcdandan_three);
                pcdandan_four = (TextView) itemView.findViewById(R.id.pcdandan_four);
                pcdandan_fiv = (TextView) itemView.findViewById(R.id.pcdandan_fiv);
                kuaisan_1 = (TextView) itemView.findViewById(R.id.kuaisan_1);
                kuaisan_2 = (TextView) itemView.findViewById(R.id.kuaisan_2);
                kuaisan_3 = (TextView) itemView.findViewById(R.id.kuaisan_3);
                kuai8_1 = (TextView) itemView.findViewById(R.id.kuai8_1);
                kuai8_2 = (TextView) itemView.findViewById(R.id.kuai8_2);
                kuai8_3 = (TextView) itemView.findViewById(R.id.kuai8_3);
                kuai8_4 = (TextView) itemView.findViewById(R.id.kuai8_4);
                kuai8_5 = (TextView) itemView.findViewById(R.id.kuai8_5);
                kuai8_6 = (TextView) itemView.findViewById(R.id.kuai8_6);
                kuai8_7 = (TextView) itemView.findViewById(R.id.kuai8_7);
                kuai8_8 = (TextView) itemView.findViewById(R.id.kuai8_8);
                kuai8_9 = (TextView) itemView.findViewById(R.id.kuai8_9);
                kuai8_10 = (TextView) itemView.findViewById(R.id.kuai8_10);
                kuai8_one = (TextView) itemView.findViewById(R.id.kuai8_one);
                kuai8_two = (TextView) itemView.findViewById(R.id.kuai8_two);
                kuai8_three = (TextView) itemView.findViewById(R.id.kuai8_three);
                kuai8_four = (TextView) itemView.findViewById(R.id.kuai8_four);
                kuai8_fiv = (TextView) itemView.findViewById(R.id.kuai8_fiv);
                kuai8_six = (TextView) itemView.findViewById(R.id.kuai8_six);
                kuai8_seven = (TextView) itemView.findViewById(R.id.kuai8_seven);
                kuai8_eight = (TextView) itemView.findViewById(R.id.kuai8_eight);
                kuai8_noon = (TextView) itemView.findViewById(R.id.kuai8_noon);
                kuai8_ten = (TextView) itemView.findViewById(R.id.kuai8_ten);
                shifentv1 = (TextView) itemView.findViewById(R.id.shifentv1);
                shifentv2 = (TextView) itemView.findViewById(R.id.shifentv2);
                shifentv3 = (TextView) itemView.findViewById(R.id.shifentv3);
                shifentv4 = (TextView) itemView.findViewById(R.id.shifentv4);
                shifentv5 = (TextView) itemView.findViewById(R.id.shifentv5);
                includ1_one1 = (TextView) itemView.findViewById(R.id.includ1_one1);
                includ1_one2 = (TextView) itemView.findViewById(R.id.includ1_one2);
                includ1_one3 = (TextView) itemView.findViewById(R.id.includ1_one3);
                includ1_one4 = (TextView) itemView.findViewById(R.id.includ1_one4);
                includ1_one5 = (TextView) itemView.findViewById(R.id.includ1_one5);
                includ1_one6 = (TextView) itemView.findViewById(R.id.includ1_one6);
                includ1_one7 = (TextView) itemView.findViewById(R.id.includ1_one7);
                includ1_one8 = (TextView) itemView.findViewById(R.id.includ1_one8);
                includ1_one8 = (TextView) itemView.findViewById(R.id.includ1_one8);
                liuhecaitv1 = (TextView) itemView.findViewById(R.id.liuhecaitv1);
                liuhecaitv2 = (TextView) itemView.findViewById(R.id.liuhecaitv2);
                liuhecaitv3 = (TextView) itemView.findViewById(R.id.liuhecaitv3);
                liuhecaitv4 = (TextView) itemView.findViewById(R.id.liuhecaitv4);
                liuhecaitv5 = (TextView) itemView.findViewById(R.id.liuhecaitv5);
                liuhecaitv6 = (TextView) itemView.findViewById(R.id.liuhecaitv6);
                liuhecaitv7 = (TextView) itemView.findViewById(R.id.liuhecaitv7);
                liuhecaitv8 = (TextView) itemView.findViewById(R.id.liuhecaitv8);


            }
        }
    }
}

